package cn.xiuxius.embedded.command.converter;

import cn.xiuxius.embedded.model.LMHFlashOptionType;
import picocli.CommandLine;

public class LMHConverter implements CommandLine.ITypeConverter<LMHFlashOptionType> {
    @Override
    public LMHFlashOptionType convert(String value) {
        try {
            return LMHFlashOptionType.from(value.trim().toUpperCase());
        } catch (Exception e) {
            throw new CommandLine.TypeConversionException("Invalid LMHFlashOptionType: " + value);
        }
    }
}

